﻿/*****************************************************************************
 * Hyldahl.Services.TaskProcessing.Test            Created by: MSH 2008.07.22
 * --------------------------------------------------------------------------
 * FileName: Dummy\DummyContext.cs
 * --------------------------------------------------------------------------
 * Copyright 2009 Martin Sixhøj Hyldahl
 *****************************************************************************/

using Hyldahl.Services.TaskProcessing.Data;

namespace Hyldahl.Services.TaskProcessing.Test.Dummy
{
    public class DummyContext : TaskProcessingContext
    {
        /*****************************************************
         * FIELDS
         *****************************************************/
        private TaskDataProvider taskDataProvider;

        /*****************************************************
         * CONSTRUCTORS
         *****************************************************/

        /// <summary>
        /// Initializes a new instance of the <see cref="DummyContext"/> class.
        /// </summary>
        public DummyContext()
        {
            this.taskDataProvider = new DummyTaskDataProvider();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DummyContext"/> class.
        /// </summary>
        /// <param name="taskDataProvider">The task data provider.</param>
        public DummyContext(TaskDataProvider taskDataProvider)
        {
            this.taskDataProvider = taskDataProvider;
        }


        /// <summary>
        /// Gets the data store.
        /// </summary>
        /// <value>The data store.</value>
        public override TaskDataProvider DataStore
        {
            get
            {
                return this.taskDataProvider;
            }
        }

        /// <summary>
        /// Gets the task processor plugins.
        /// </summary>
        /// <value>The task processor plugins.</value>
        public override TaskProcessorPluginManager TaskProcessorPlugins
        {
            get
            {
                return base.TaskProcessorPlugins;
            }
        }
    }
}
